package fem2;

import math2.EASQ1E4;
import math2.EASQ1E5;
import fem2.enu.EASModeType;

/**
 * TODO
 * 
 * @author hbui
 * 
 */
public class EASModeManager {

	private static EASModeManager instance = new EASModeManager();

	private EASModeManager() {
	}

	/**
	 * Get the instance of EASModeManager singleton
	 * 
	 * @return the Singleton instance
	 */
	public static EASModeManager getInstance() {
		return instance;
	}

	private EASMode q1e4Mode = new EASQ1E4();
	private EASMode q1e5Mode = new EASQ1E5();

	/**
	 * @param modeType
	 * @return the EASMode associated with mode type
	 */
	public EASMode getMode(EASModeType modeType) {
		switch (modeType) {
		case Q1E4:
			return q1e4Mode;
		case Q1E5:
			return q1e5Mode;
		default:
			throw new Error("invalid enhanced mode type");
		}
	}
}
